﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;

using Newtonsoft.Json.Linq;

namespace KorbeRTR.MES
{
    public class ProtocolHelper
    {
        public static JObject CreateFrame()
        {
            var root = new JObject();
            root["EquimentID"] = HttpClientHelper.EquimentID;
            root["IPAddress"] = HttpClientHelper.IPAddress;
            root["DateTime"] = DateTime.Now.ToString("yyyyMMddhhmmssffffff");
            return root;
        }
    }

    public static class ProtocolExtension
    {
        public static void AddHeaders(this HttpContent content)
        {
            //content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
            //content.Headers.Add("MsgHeader", HttpClientHelper.AuthString);
        }
    }
}
